/**
 * Created by XQ on 2017/4/28.
 */
//     所有的点击事件start
var MyClick = function (typ,demoId) {

    switch (typ){
        case "show":document.getElementById(demoId).setAttribute("class","appear");break;
        case "hidden":document.getElementById(demoId).setAttribute("class","hidden");break;
    }
}
//     所有的点击事件end


// 工具栏页面 start

// 工具栏页面 end

// Homepage start
// 控制更新按钮
var refresh = function (id) {
    var myIdContent = document.getElementById(id);
    var myIdContentClassName = myIdContent.className+" fa-spin";
    myIdContent.setAttribute("class",myIdContentClassName);
    setTimeout(function () {
        myIdContent.setAttribute("class","fa fa-refresh");
    },600)
}
// Homepage start


// 图片上传
function change(id,demoId) {
    var file = document.getElementById(id);
        html5Reader(file,demoId);
}

function html5Reader(file,demoId1) {
    var file = file.files[0];
    var reader = new FileReader();
    reader.readAsDataURL(file);
    reader.onload = function (e) {
        var pic = document.getElementById(demoId1);
        pic.src = this.result;
    }
}



